import leap_year


def _count_day_in_year(year: int, month: int, date: int):
    day_count_of_feb = 29 if leap_year.is_leap_year(year) else 28
    month_dic = [31, day_count_of_feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
    return sum(month_dic[0:month - 1], date)


def _main():
    input_value = input("请输入 年,月,日 ：")
    year, month, date = [int(i) for i in input_value.split(",")]
    print(_count_day_in_year(year, month, date))


if __name__ == "__main__":
    _main()
